package com.tsinghuabigdata.edu.ddmath.module.ddwork.bean;

import com.tsinghuabigdata.edu.ddmath.constant.ErrTag;
import com.tsinghuabigdata.edu.ddmath.util.AppLog;

import org.json.JSONObject;

import java.io.Serializable;

/**
 * 题目答案矩形区域
 */
public class QuestionRect implements Serializable {

    private static final long serialVersionUID = 2674146233180358325L;

    //矩形区域
    private double x;
    private double y;
    private double width;
    private double height;


    public JSONObject getJsonObject(){
        JSONObject json = new JSONObject();
        try{
            json.put( "x", x );
            json.put( "y", y );
            json.put( "width", width );
            json.put( "height", height );
        }catch (Exception e){
            AppLog.i(ErrTag.TAG_JSON, e.toString() );
        }
        return json;
    }

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }
}
